package school.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import school.DAO.ICommonDAO;
import school.DAO.IStudentDAO;
import school.entity.Student;
import school.service.ICommonService;
import school.service.IStudentService;

public class CommonService<T> implements ICommonService<T>{

	protected ICommonDAO<T> dao;
	
	@Transactional
	public void delete(T t) {
		dao.delete(t);
	}
	@Transactional
	public T findById(int id) {
		return dao.findById(id);
	}
	@Transactional
	public void insert(T t) {
		dao.insert(t);
	}
	@Transactional
	public void update(T t) {
		dao.update(t);
	}
	
}
